<form name = "product" method = "post" action = "{$action}">
    <table class = "unocart">
        <tr>
            <td colspan="2">
                <span class = "unocart_name_prod">{$product->product_name}</span>
            </td>
        </tr>
        <tr>
            <td width = "100" style = "vertical-align:top">
            <!-- This is for video-->
            {if count($videos)}
                {foreach from=$videos item=video name=videotemp}
                    <a style = "display:none" class = "video_full" id = "hide_video_{$smarty.foreach.videotemp.iteration}" href = "" alt = "video"></a>
                {/foreach}
            {/if}
            <!-- End for video--><img id = "main_image" src = "{$image_product_path}/{if $product->product_full_image}{$product->product_full_image}{else}{$no_image}{/if}" alt = "{$alt_main_image}" /></td>
            <td class = "unocart_img_description" style = "padding-left: 10px;">
            {if count($images) + count($videos) > 1}
                {foreach from=$images item=image name=imagefor}
                    <img class = "unocart_img_thumb" src = "{$image_product_path}/{$image->image_thumb}" alt = "{$product->product_name}" onclick = "showImage('{$image_product_path}/{$image->image_name}')" />
                {/foreach}
            {/if}
                <br />
            {if count($videos)}
                {foreach from=$videos item=video name=videofor}
                    <a href="{$video_product_path}/{$video->video_name}" id="video_{$smarty.foreach.videofor.iteration}" onclick = "showVideo(this.id); return false;"><img src = "{$video_image_preview_path}{if $video->video_preview}{$video->video_preview}{else}video.gif{/if}" alt = "video" /></a><br /><br />
                {/foreach}
            {/if}
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class = "unocart_prod_description">
                    {$product->product_description}
                </div>
                <br />
                <div class = "unocart_prod_attributes">
                {if $attributes}
                    <table class = "unocart" style  = "margin:0">
                        {foreach from=$attributes item = attribut}
                        <tr>
                            <td width = "50">
                                {$attribut->attr_name}:
                            </td>
                            <td>
                                {$attribut->selects}
                            </td>
                        </tr>
                        {/foreach}
                    </table>
                {/if}
                </div>
                <br />
                <div class = "unocart_prod_description">
                {if $product->product_quantity <= 0}
                    {$product->product_availability}
                {/if}
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table>
                {if $product->product_is_add_price}
                    <tr>
                        <td colspan = "5">
                            <table>
                            {foreach from=$product->product_add_prices item=add_price}
                                <tr>
                                    <td>
                                        {$add_price->product_quantity_start} - {if $add_price->product_quantity_finish}{$add_price->product_quantity_finish}{/if}
                                    </td>
                                    <td>
                                        <strong>{format_price price=$add_price->product_price}</strong> 
                                    </td>
                                </tr>
                            {/foreach}
                            </table>
                        </td>
                    </tr>
                {/if}        
                {if $product->product_show_price}
                    <tr>
                        <td width = "60">
                            {$smarty.const._UNOCART_QUANTITY}
                        </td>
                        <td width = "40">
                            <input type = "text" name = "quantity" id = "quantity" class = "inputbox" style = "width: 20px" value = "1" />
                        </td>
                        <td width = "100">
                            {if !$product->product_is_add_price}
                                x {format_price price = $product->product_price}
                            {/if} 
                        </td>
                        <td id = "unocart_button">
                            <input type = "hidden" name = "option" value = "com_unocart" />
                            <input type = "hidden" name = "product_id" id = "product_id" value = "{$product->product_id}" />
                            <input type = "hidden" name = "task" value = "add_to_cart" />
                            <input type = "hidden" name = "Itemid" value = "{$Itemid}" />
                            <input type = "submit" name = "add_to_cart" class = "button" value = "{$smarty.const._UNOCART_ADD_TO_CART}" />
                            {if $enable_wishlist}
                                <input type = "submit" name = "add_to_wishlist" class = "button" value = "{$smarty.const._UNOCART_ADD_TO_WISHLIST}" />
                            {/if}
                        </td>
                        <td id = "unocart_image_loading" style = "display:none">
                            <img src = "{$path_to_image}/progress.gif" />
                        </td>
                    </tr>
                {else}
                    <tr>
                        <td colspan = "2">
                            {$smarty.const._UNOCART_NO_PRICE}
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <input type = "hidden" name = "product_id" id = "product_id" value = "{$product->product_id}" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan = "2">
                            {$smarty.const._UNOCART_NO_PRICE_ADMIN_MESSAGE}<br />
                            <textarea name = "request_message" id = "request_message"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan = "2">
                            <input type = "button" class = "button" name = "send_to_admin" value = "{$smarty.const._UNOCART_NO_PRICE_SEND_TO_ADMIN}" onclick = "sendToAdmin()" />
                        </td>
                    </tr>
                {/if}
                </table>
            </td>
        </tr>
    </table>
</form>

{if count ($related_prod)}
    <hr class = "unocart_line" />
    <hr class = "unocart_line" />
    {$smarty.const._UNOCART_RELATED_PRODUCTS}
    <table class = "unocart">
        <tr>
        {foreach from=$related_prod item=product name=prodfor}
            <td width = "{math equation="100/count" count=$count_product_to_row}%" class = "unocart_related">
                <p>
                    <a href="{$product->product_link}">{$product->product_name}</a>
                </p>
                <p>
                    <a href="{$product->product_link}">
                        <img class = "unocart_img" src = "{$image_product_path}/{if $product->product_thumb_image}{$product->product_thumb_image}{else}{$no_image}{/if}" alt="{$product->product_name}" />
                    </a>
                </p>
                <p>
                    <span style="color: #AA25FF">{format_price price = $product->product_price}</span>
                </p>
            </td>
            {if $smarty.foreach.prodfor.iteration % $count_related_prod == 0}
                </tr>
                <tr>
            {/if}
        {/foreach}
        </tr>
    </table>
{/if}

{if $product->can_demo_download}
    <a onclick = "this.target = '_blank'" href = "index2.php?option=com_unocart&task=d_demo&product_id={$product->product_id}&no_html=1">
        {$smarty.const._UNOCART_DOWNLOAD_DEMO}
    </a>
{/if}